import allure

from src.api.base_api import BaseApi


class WorkSurface(BaseApi):
    def __init__(self, base_url):
        super().__init__(base_url)

    @allure.step('获取工作台数据列表')
    def list(self,platform,**kwargs):
        '''
        url=https://ck-medium-api-test.cds8.cn/v1/workSurface/todoList/v2?platform=ks&dept_id=&user_id=
        get
        '''
        params={
            'platform':platform,
            'dept_id':None,
            'user_id':None
        }

        for k,v in kwargs.items():
            params[k] = v

        res_json = self.send(method='get',path='workSurface/todoList/v2',params=params)

        return res_json
